- Tuesday, September 3, 2024
TanStack Router's Server Functions allows developers to execute code only on the server, keeping sensitive logic away from the client. They are defined using `createServerFn` and can be called from anywhere in the application, including loaders, hooks, and other server functions. Server functions accept a single parameter and also provide access to server request context, allowing developers to work with headers, sessions, and cookies.
- Thursday, September 19, 2024
TanStack Router, a type-safe routing library for TypeScript, made performance improvements to address a bottleneck in TypeScript's language service when handling large route trees. The issue stemmed from the language service having to infer types for the entire route tree, even when only a specific route was referenced. To solve this, TanStack Router introduced a new approach for file-based routing where the route tree is explicitly declared instead of inferred, allowing the language service to infer types only for the relevant route.
- Tuesday, August 20, 2024
After using TanStack Router in production for eight months, this author believes in organizing code into vertical modules, using loaders for page-level data and suspense queries for component-specific data, and avoiding premature code generalization. He promotes a “go gardening approach” that involves abstracting code only when clear patterns show up.
- Wednesday, August 21, 2024
With the addition of Server Components and Server Actions, React is evolving into a full-stack framework.
- Monday, June 10, 2024
Teo is a schema-driven web server framework. The server-side API is native to Rust, Node.js, and Python. It supports automatic database migration, generated ORM types and interfaces, generated frontend query clients, custom route handlers, and more.
- Wednesday, March 6, 2024
ExpressoTS is a Typescript and Node.js framework for quickly building scalable, easy-to-read and maintain server-side applications.
- Wednesday, July 3, 2024
React Server Components (RSC) are primarily server-side components that optimize performance by fetching data and rendering on the server, while Client Components handle interactivity and state management on the client side. In the RSC paradigm, Server Components are the default, and Client Components are explicitly marked using 'use client'. While Server Components cannot be directly nested within Client Components, they can be passed as props to Client Components.
- Thursday, May 23, 2024
React 19 has features like Server Components and Server Actions, which optimize performance and simplify data handling by shifting more logic to the server. Server Actions make API endpoint creation and form handling easier by automatically managing pending UI states, error handling, and optimistic UI updates.
- Friday, September 13, 2024
React 19 introduces major updates like Server Components, improving performance by rendering on the server and reducing client-side JavaScript. New features include Actions for handling events and enhanced hooks like useActionState for managing form states, streamlining both server and client workflows.
- Wednesday, April 10, 2024
This tutorial teaches how to use Next.js Server Actions for manipulating data. Server Actions, combined with React Server Components (RSC) and the App Router, can be used to edit entities within the database without the need to convert Server Components to Client Components for database interactions.
- Monday, March 18, 2024
Modal's HTTP and WebSocket stack for serverless functions allows for seamless web endpoint deployment and real-time communication capabilities. To overcome the limits of traditional serverless platforms, Modal designed a system that can handle demanding workloads, offering extensive CPU, memory, and GPU resources. Modal treats HTTP/WebSocket requests like function calls and leverages Rust and ASGI (Asynchronous Server Gateway Interface) for efficient processing.
- Thursday, May 16, 2024
Server-sent events is a protocol that allows web servers to push data to clients without the need for alternative mechanisms such as pinging, long-polling, or WebSockets. Better SSE is a dependency-less server-sent events implementation for Node, written in TypeScript.
- Tuesday, April 16, 2024
React Server Components (RSCs) allow server-exclusive code, which can lead to better performance. However, this means that popular styling options, like CSS-in-JS libraries which rely on React's lifecycle, can conflict with RSCs. RSC's server-side focus clashes with the browser-centric nature of traditional CSS-in-JS libraries, but there are “zero-runtime” CSS-in-JS libraries that are fully compatible with RSCs today. If your application doesn't use these and already has a good “time-to-interactive” time, then migrating to these libraries is not worth it.
- Tuesday, September 24, 2024
Use environment variables to control feature visibility, validate them, and then access them within server and client components using custom functions and a feature provider. This blog post explains how to implement basic feature flagging with the Next.js App Router. It demonstrates a practical application of feature flagging by controlling the visibility of sidebar routes based on feature flags.
- Friday, August 9, 2024
Bun v1.1.22 introduces performance enhancements, bug fixes, and Node.js compatibility improvements, including faster Express execution, ES module loading, and Bun.serve() POST requests, as well as reduced memory usage and improved stack traces.
- Friday, August 9, 2024
Stack Auth is a managed user authentication solution. It is developer-friendly and fully open-source. It supports Next.js, has prebuilt auth components, and supports RBAC.
- Wednesday, March 6, 2024
React 19 introduces several significant improvements designed to streamline development and boost application performance. Key features include a performance-enhancing compiler, simplified form handling with Actions, server-side rendering optimizations with Server Components, and better integration with Web Components. The update promises faster rendering, smoother user experiences, and easier development workflows.
- Tuesday, July 16, 2024
Remix's "Fog of War" feature dynamically loads route information based on user interactions. This optimizes React Router SSR applications by decoupling rendering from fetching, resulting in a "fetch then render" approach that eliminates network waterfalls. It uses a Route Manifest to prefetch route data and components so that navigation is smooth.
- Thursday, August 15, 2024
You can speed up client-side rendered apps by preloading the necessary page chunks before they're needed, avoiding delays caused by lazy loading. By injecting a small script during the build process, you can make sure that route-specific chunks load in parallel with the app's entry point.